<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!doctype html>
<html lang="zh_CN">
<body>
<table width="1004" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="#FFFFFF">
    <tr>
        <td align="center" valign="top">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F5F5F5" class="bg_qc">
            </table>
            <table height="30" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
            <form method="post" action="/address">
                <table width="66%" border="0" cellpadding="5" cellspacing="1" bgcolor="#E0EDB7">
                    <tr>
                        <td height="30" colspan="2" align="center" background="themes/nzblue/images/nzcms/list_bg.gif" class="white14B">发布求职信息</td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">标题：</td>
                        <td bgcolor="#FFFFFF"><input type="text" name="title" style="width: 260px; height: 30px" required="required"
                                                     id="title" placeholder="请输入标题" /></td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">求职类型：</td>
                        <td bgcolor="#FFFFFF"><input type="text" name="type" style="width: 260px; height: 30px" required="required"
                                                     id="type" placeholder="求职类型" /></td>
                        </td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">薪水预期：</td>
                        <td bgcolor="#FFFFFF"><input type="text" name="salary" style="width: 260px; height: 30px"
                                                     required="required" id="salary" placeholder="请输入薪水预期" /></td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">期望工作地点：</td>
                        <td bgcolor="#FFFFFF">		<select onchange="changeCity(this.value)" name="address">
                            <option>--请选择省份--</option>
                            <option value="北京">北京</option>
                            <option value="天津">天津</option>
                            <option value="上海">上海</option>
                            <option value="重庆">重庆</option>
                            <option value="浙江省">浙江省</option>
                            <option value="河北省">河北省</option>
                            <option value="广东省">广东省</option>
                            <option value="山西省">山西省</option>
                            <option value="辽宁省">辽宁省</option>
                            <option value="吉林省">吉林省</option>
                            <option value="黑龙江省">黑龙江省</option>
                            <option value="江苏省">江苏省</option>
                            <option value="安徽省">安徽省</option>
                            <option value="福建省">福建省</option>
                            <option value="江西省">江西省</option>
                            <option value="山东省">山东省</option>
                            <option value="湖北省">湖北省</option>
                            <option value="湖南省">湖南省</option>
                            <option value="海南省">海南省</option>
                            <option value="四川省">四川省</option>
                            <option value="贵州省">贵州省</option>
                            <option value="云南省">云南省</option>
                            <option value="陕西省">陕西省</option>
                            <option value="甘肃省">甘肃省</option>
                            <option value="青海省">青海省</option>
                            <option value="台湾省">台湾省</option>

                        </select>
                            <select id="city" name="two-address">
                            </select>
                            </td>
                    </tr>
                    <tr>
                        <td height="50" align="right" bgcolor="#FFFFFF">内容：</td>
                        <td bgcolor="#FFFFFF"><textarea style="width: 99%; height: 130px" name="contents" id="contents"
                                                        placeholder="请输入内容" required="required"></textarea></td>
                    </tr>
                    <tr>
                        <td bgcolor="#FFFFFF" colspan="2" align="center"><label> <input type="submit" name="Submit"
                                                                                        value="提交" /> &nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" name="Submit2" value="重置" />
                        </label></td>
                    </tr>
                </table>
            </form>
            <table height="50" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
        </td>
    </tr>
</table>

</body>
</html>

<script>
    //创建二维数组存储省份和对应的城市
    var cityList = new Array();
    cityList["北京"] = new Array("朝阳区", "海淀区", "东城区", "西城区");
    cityList["浙江省"] = new Array("杭州市", "嘉兴市", "宁波市", "绍兴市");
    cityList["河北省"] = new Array("石家庄市", "唐山市", "承德市", "张家口市");
    cityList["广东省"] = new Array("广州市", "惠州市", "深圳市", "茂名市");
    cityList["天津"] = new Array("和平区","河西区","南开区","河东区","河北区","红桥区","东丽区","西青区","津南区","北辰区","蓟州区","静海区","宝坻区","宁河区","武清区");
    cityList["陕西省"] = new Array("西安市","宝鸡市","咸阳市","铜川市","渭南市","延安市","榆林市","汉中市","安康市","商洛市");

    function changeCity(val) {
        //获取到城市的下拉列表框
        var city = document.getElementById("city");
        //先去清空原有的城市下拉列表内容
        city.options.length = 0;
        var arr = cityList[val];
        for(var i = 0; i < arr.length; i++) {
            //创建option元素节点
            var option = document.createElement("option");
            //设置option元素节点的内容和value
            option.innerHTML = arr[i];
            option.value = arr[i];
            //将新创建的option节点添加到城市下拉框中
            city.appendChild(option);
        }
    }
</script>
